package com.sakura.service;

import com.sakura.dao.BookDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * @author Sakura
 * @Date 2023-02-20 18:32
 */
@Service
public class BookService {

    @Qualifier("bookDao") //指定需要装配的组件的id
    @Autowired
    private BookDao bookDao;

    public void print(){
        System.out.println(bookDao);
    }

    @Override
    public String toString() {
        return "BookService [bookDao=" + bookDao + "]";
    }

}
